﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ShopCusList.aspx.cs" Inherits="ShopCusList" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>单模模板</title>
    <script src="./../js/extTools.js" type="text/javascript"></script>
    <link href="./../css/ExtStyle.css" rel="stylesheet" type="text/css" />
    <script src="../js/jquery/jquery-1.8.1.min.js" type="text/javascript"></script>
    <script src="../js/jquery/jquery.iDialog.js" dialog-theme="default" type="text/javascript"></script>
    <script src="../js/config.js" type="text/javascript"></script>

    <link rel="stylesheet" type="text/css" href="../js/plugins/imgviewer/css/viewer.css" />
    <script type="text/javascript" src="../js/plugins/imgviewer/js/viewer.min.js"></script>

    <style type="text/css">
        .addDeleteImg{ height: 0; width: 0;}
        .x-component div.file-panel 
        {
            position: absolute;
            height: 0;
            background: rgba( 0, 0, 0, 0.5 );
            width: 100%;
            top: 0;
            left: 0;
            overflow: hidden;
            z-index: 300;
        }
        .x-component div.file-panel span 
        {
            width: 24px;
            height: 24px;
            display: inline;
            float: right;
            text-indent: -9999px;
            overflow: hidden;
            background: url(../images/icons.png) no-repeat;
            margin: 5px 1px 1px;
            cursor: pointer;
        }
        .x-component div.file-panel span.cancel 
        {
            background-position: -48px -24px;
        }
        .x-component div.file-panel span.cancel:hover 
        {
            background-position: -48px 0;
        }
        
    </style>

    <script>
//        $(function () {
//            $(".btnimg").live("click", function () {
//                //alert($(this).attr('src'));
//                $.dialog({
//                    title: '图片预览',
//                    lock: true,
//                    content: '<img src="' + $(this).attr('src').replace('?w=40','') + '" width="418" height="387">'
//                });
//            });
//        });

//        var addRecord = function (form, grid) {
//            //            if (!form.getForm().isValid()) {
//            //                Ext.net.Notification.show({
//            //                    iconCls: "icon-exclamation",
//            //                    html: "Form is invalid",
//            //                    title: "Error"
//            //                });

//            //                return false;
//            //            }
//            App.Panel3.setTitle("详细资料-新增");
//            App.ActState.setValue("Add");
//            App.Panel3.setCollapsed(false);
//            form.getForm().reset();
//            //grid.store.insert(0, form.getForm().getFieldValues());
//            //            grid.getSelectionModel().selectRow(0); //选中第一行
//            //            grid.getView().focusRow(0); //获取焦点

//        };

//        var editRecord = function (form, grid) {
//            if (grid.getSelectionModel().getCount() == 0) {
//                Ext.Msg.notify('温馨提示', '请选择需要编辑的行！');
//                return false;
//            }
//            App.ActState.setValue("Edit");
////            App.Panel3.setCollapsed(false);
////            //grid.store.insert(0, form.getForm().getFieldValues());
////            //            grid.getSelectionModel().selectRow(0); //选中第一行
////            //            grid.getView().focusRow(0); //获取焦点
//            //            App.Panel3.setTitle("详细资料-编辑");

//            App.winMain.setTitle('新增');
//            App.winMain.show(form);

//        };

//        var deleteRecord = function (form, grid) {
//            if (grid.getSelectionModel().getCount() == 0) {
//                Ext.Msg.notify('温馨提示', '请选择需要删除的行！');
//                return false;
//            }
//            grid.deleteSelected();
//            form.getForm().reset();
//            CompanyX.BtnDelete();
        //        };

//        var saveRecord = function (obj) {
//            var fields = "";
//            var vals = "";
//            var str;
//            obj.items.each(function (item, index, length) {
//                if (item.getValue() != null) {
//                    str = item.initialConfig.id;
//                    fields += str.substring(3, str.length) + ",";
//                    if (item.getXType() == "datefield") {
//                        vals += Ext.util.Format.date(item.getValue(), 'Y-m-d') + ",";
//                    } else
//                        vals += item.getValue() + ",";
//                }
//            });
//            if (obj.getForm().isValid()) {
//                fields = fields.substring(0, fields.length - 1);
//                vals = vals.substring(0, vals.length - 1);
//                CompanyX.BtnSave(fields, vals);
//            }
//            //            alert(obj.getForm().getValues(true));
//        };





        var btnEdit_Click = function () {
            App.winMain.setTitle('修改基本信息');
            App.winMain.show();
        };

        var btnMainSave_Success = function (response, result, control, type, action, extraParams) {
            //var last = JSON.stringify(result);
            //alert(last);
            //console.log(result);

            App.winMain.close();
            //刷新列表数据
            //App.gridMain.getStore().reload();

            Ext.net.Notification.show({
                html: '保存成功',
                title: '提示'
            });
        };

        var btnMainSave_Failure = function (response, result, control, type, action, extraParams) {
            var msg = result.errorMessage;
            Ext.net.Notification.show({
                html: msg,
                title: '提示'
            });
        }

        var btnImgUp_Click = function () {
            App.imgMain.setTitle('上传图片');
            App.imgMain.show();
        }

        var btnImgSave_Success = function (response, result, control, type, action, extraParams) {
            //App.imgMain.close();
            Ext.net.Notification.show({
                html: '保存成功',
                title: '提示'
            });
        };

        var btnImgSave_Failure = function (response, result, control, type, action, extraParams) {
            var msg = result.errorMessage;
            Ext.net.Notification.show({
                html: msg,
                title: '提示'
            });
        }

        var isViewer = 0;
        $(function () {
            $(".imgPreview").live("click", function () {
                var isRowName = App.hidIsRow.getValue();
                if (isRowName == $(this).attr('data') || isRowName == "") {
                    App.hidIsRow.setValue($(this).attr('data'));
                    isRowName = App.hidIsRow.getValue();
                    var form = App.frmPreview;
                    var json = form.getForm().getFieldValues();
                    //alert(json.ShopCode);
                    if (json.ShopCode != "") {
                        CompanyX.getImgUrl(json, {
                            success: function (data) {
                                $("#ext-element-36").attr('title', App.hidImgType1Title1.getValue())
                                $("#ext-element-37").attr('title', App.hidImgType2Title1.getValue())

                                $("#ext-element-38").attr('title', App.hidImgType3Title1.getValue())
                                $("#ext-element-39").attr('title', App.hidImgType3Title2.getValue())
                                $("#ext-element-40").attr('title', App.hidImgType3Title3.getValue())
                                $("#ext-element-41").attr('title', App.hidImgType3Title4.getValue())
                                $("#ext-element-42").attr('title', App.hidImgType3Title5.getValue())
                                $("#ext-element-43").attr('title', App.hidImgType3Title6.getValue())
                                $("#ext-element-44").attr('title', App.hidImgType3Title7.getValue())

                                $("#ext-element-45").attr('title', App.hidImgType4Title1.getValue())
                                $("#ext-element-46").attr('title', App.hidImgType4Title2.getValue())
                                $("#ext-element-47").attr('title', App.hidImgType4Title3.getValue())
                                $("#ext-element-48").attr('title', App.hidImgType4Title4.getValue())
                                $("#ext-element-49").attr('title', App.hidImgType4Title5.getValue())
                                $("#ext-element-50").attr('title', App.hidImgType4Title6.getValue())
                                $("#ext-element-51").attr('title', App.hidImgType4Title7.getValue())
                                $("#ext-element-52").attr('title', App.hidImgType4Title8.getValue())
                            }
                        });




                        App.imgPreview.setTitle('图片列表');
                        App.imgPreview.show();

                        if (isViewer == 0) {
                            isViewer = 1;
                            $("#imgPanelType1-innerCt").viewer();
                            $("#imgPanelType2-innerCt").viewer();
                            $("#imgPanelType3-innerCt").viewer();
                            $("#imgPanelType4-innerCt").viewer();
                            $(".x-component.addDeleteImg").append('<div class="file-panel"><span class="cancel" onclick="delImg();">删除</span></div>');
                        }
                    }
                }
                else {
                    App.hidIsRow.setValue("");
                }
            });

            addDeleteImgButton();

        });

        var isGuid = "";
        var imgId = "";
        var imgUrl = "";
        function addDeleteImgButton() {
            // 鼠标进入li 效果 console.log()
            $('.x-component.addDeleteImg').live('mouseenter', function () {
                isGuid = $(this).find('.addDeleteImg').attr('alttext');
                imgId = $(this).find('.addDeleteImg').attr('id');
                imgUrl = $(this).find('.addDeleteImg').attr('src');
                if (isGuid != null && isGuid != "") {
                    $(this).find('.file-panel').stop().animate({ height: 29 });
                }
            });
            $('.x-component.addDeleteImg').live('mouseleave', function () {
                isGuid = "";
                imgId = "";
                imgUrl = "";
                $(this).find('.file-panel').stop().animate({ height: 0 });
            });
        }
        //删除图片
        function delImg() {
            if (isGuid != "") {
                CompanyX.delImg({ "Guid": isGuid, "Url": imgUrl }, {
                    success: function (data) {
                        if (data > 0) {
                            $('#' + imgId).attr('src', '');
                            $('#' + imgId).attr('title', '');
                            $('#' + imgId).attr('alttext', '');

                            Ext.net.Notification.show({
                                html: '删除成功',
                                title: '提示'
                            });
                        }
                        else {
                            Ext.net.Notification.show({
                                html: '删除失败',
                                title: '提示'
                            });
                        }
                    }
                });
            }
        }

    </script>
    <style type="text/css">
        .x-window{overflow:visible}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Crisp" />
        <ext:Viewport ID="Viewport1" runat="server">
            <LayoutConfig>
                <ext:HBoxLayoutConfig Align="Stretch" />
            </LayoutConfig>
            <Defaults>
                <ext:Parameter Name="margin" Value="0" Mode="Value" />
            </Defaults>
            <Items>
                <ext:Panel ID="Panel1" runat="server" Flex="1" Layout="FitLayout">
                    <TopBar>
                        <ext:Toolbar ID="Toolbar1" runat="server">
                            <Items>
                                <ext:Button runat="server" ID="btnEdit" Text="修改" Disabled="true" IconCls="edit24" Scale="Large" IconAlign="Left" Cls="x-btn-as-arrow" RowSpan="3">
                                    <Listeners>
                                        <Click Handler="btnEdit_Click()" />
                                    </Listeners>
                                </ext:Button>
                                <ext:Button runat="server" ID="btnDelete" Text="删除" Disabled="true" IconCls="del24" Scale="Large" IconAlign="Left" Cls="x-btn-as-arrow" RowSpan="3">
                                    <DirectEvents>
                                        <Click OnEvent="btnDelete_Click" Success="#{MainPanel}.getStore().reload();" Failure="Ext.net.Notification.show({html:result.errorMessage,title:'提示'});">
                                            <Confirmation ConfirmRequest="true" Title="提示" Message="删除后不可恢复，确定删除？" />
                                            <EventMask ShowMask="true" Target="Page" />
                                            <ExtraParams>
                                                <ext:Parameter Name="model" Mode="Raw" Value="#{frmMain}.getForm().getFieldValues()" />
                                            </ExtraParams>
                                        </Click>
                                    </DirectEvents>
                                </ext:Button>
                                <ext:Button runat="server" ID="btnImgUp" Text="上传图片" Disabled="true" Icon="FolderUp" Scale="Large" IconAlign="Left" Cls="x-btn-as-arrow" RowSpan="3">
                                    <Listeners>
                                        <Click Handler="btnImgUp_Click()" />
                                    </Listeners>
                                </ext:Button>

                                <%--<ext:Button ID="Button5" runat="server" Text="新增" IconCls="add24" Scale="Large" IconAlign="Left"
                                    Cls="x-btn-as-arrow" RowSpan="3">
                                    <Listeners>
                                        <Click Handler="addRecord(#{Editpanel},#{MainPanel})" />
                                    </Listeners>
                                </ext:Button>
                                <ext:Button ID="Button4" runat="server" Text="修改" IconCls="edit24" Scale="Large"
                                    IconAlign="Left" Cls="x-btn-as-arrow" RowSpan="3">
                                    <Listeners>
                                        <Click Handler="editRecord(#{frmMain},#{MainPanel})" />
                                    </Listeners>
                                </ext:Button>
                                <ext:Button ID="Button6" runat="server" Text="删除" IconCls="del24" Scale="Large" IconAlign="Left"
                                    Cls="x-btn-as-arrow" RowSpan="3">
                                    <Listeners>
                                        <Click Handler="if(!confirm('确定要删除？'))
                                            { return false; }else{deleteRecord(#{Editpanel},#{MainPanel})};" />
                                    </Listeners>
                                </ext:Button>--%>
                                <ext:Button ID="Button10" runat="server" Text="查找" IconCls="find24" Scale="Large"
                                    IconAlign="Left" Cls="x-btn-as-arrow" RowSpan="3">
                                    <DirectEvents>
                                        <Click OnEvent="BtnFind">
                                            <EventMask ShowMask="true" Msg="加载中..." />
                                        </Click>
                                    </DirectEvents>
                                </ext:Button>
                                <ext:Button ID="Button7" runat="server" Text="同步数据" IconCls="check124" Scale="Large"
                                    IconAlign="Left" Cls="x-btn-as-arrow" RowSpan="3">
                                    <DirectEvents>
                                        <Click OnEvent="BtnGetShop">
                                            <EventMask ShowMask="true" Msg="加载中..." />
                                        </Click>
                                    </DirectEvents>
                                </ext:Button>
                                <ext:Button ID="Button8" runat="server" Text="关闭" IconCls="close24" Scale="Large"
                                    IconAlign="Top" Cls="x-btn-as-arrow" RowSpan="3" Visible="false" />
                            </Items>
                        </ext:Toolbar>
                    </TopBar>
                    <Items>
                        <ext:Panel ID="Panel2" runat="server" Layout="BorderLayout">
                            <Items>
                                <ext:GridPanel runat="server" ID="MainPanel" Region="Center" Title="数据列表" Icon="ApplicationViewIcons"
                                    DeferRowRender="true">
                                    <TopBar>
                                        <ext:Toolbar runat="server">
                                            <Items>
                                                <ext:TextField runat="server" id="txtshop" EmptyText="输入编号/名称搜索" />
                                            </Items>
                                        </ext:Toolbar>
                                    </TopBar>
                                    <Store>
                                        <ext:Store ID="MainStore" runat="server" PageSize="50" OnReadData="MyData_Refresh">
                                            <Model>
                                                <ext:Model ID="Model1" runat="server">
                                                    
                                                </ext:Model>
                                            </Model>
                                        </ext:Store>
                                    </Store>
                                    <ColumnModel>
                                        
                                    </ColumnModel>
                                    <SelectionModel>
                                        <ext:RowSelectionModel runat="server">
                                            <Listeners>
                                                <SelectionChange Handler="if(selected.length>0){#{btnEdit}.enable();#{btnDelete}.enable();#{btnImgUp}.enable();}else{#{btnEdit}.disable();#{btnDelete}.disable();#{btnImgUp}.disable();}" />
                                                <Select Handler="#{frmMain}.getForm().loadRecord(record);#{frmImg}.getForm().loadRecord(record);#{frmPreview}.getForm().loadRecord(record);" />
                                            </Listeners>
                                        </ext:RowSelectionModel>
                                    </SelectionModel>

                                    <BottomBar>
                                        <ext:PagingToolbar ID="PagingToolbar1" runat="server">
                                            <Items>
                                                <ext:Label ID="Label1" runat="server" Text="每页显示:" />
                                                <ext:ToolbarSpacer ID="ToolbarSpacer1" runat="server" Width="10" />
                                                <ext:ComboBox ID="ComboBox1" runat="server" Width="80">
                                                    <Items>
                                                        <ext:ListItem Text="10" />
                                                        <ext:ListItem Text="20" />
                                                        <ext:ListItem Text="50" />
                                                        <ext:ListItem Text="100" />
                                                    </Items>
                                                    <SelectedItems>
                                                        <ext:ListItem Value="50" />
                                                    </SelectedItems>
                                                    <Listeners>
                                                        <Select Handler="#{MainPanel}.store.pageSize = parseInt(this.getValue(), 10); #{MainPanel}.store.reload();" />
                                                    </Listeners>
                                                </ext:ComboBox>
                                            </Items>
                                            <Plugins>
                                                <ext:ProgressBarPager ID="ProgressBarPager1" runat="server" />
                                            </Plugins>
                                        </ext:PagingToolbar>
                                    </BottomBar>
                                </ext:GridPanel>
                                <%--<ext:Panel Region="East" ID="Panel3" runat="server" Split="true" Collapsible="true"
                                    Collapsed="true" Title="详细信息" Icon="ApplicationFormEdit" PaddingSummary="5px 5px 0"
                                    Width="550" ButtonAlign="Center" Layout="BorderLayout">
                                    <Items>
                                        <ext:FormPanel ID="EditPanel" runat="server" Layout="Column" Border="false" Reference="form"
                                            ButtonAlign="Center" Title="基本信息" Region="North">
                                            <Items>
                                            </Items>
                                        </ext:FormPanel>
                                        <ext:Panel runat="server" Title="上传图片" Region="South" Height="200" Layout="AnchorLayout">
                                            <Items>
                                                <ext:RadioGroup ID="RadioGroup1" runat="server" GroupName="RadioGroup1" FieldLabel="图片类型"
                                                    Cls="x-check-group-alt">
                                                    <Items>
                                                        <ext:Radio ID="Radio7" runat="server" BoxLabel="平面图" InputValue="FlatImg" />
                                                        <ext:Radio ID="Radio1" runat="server" BoxLabel="设备图1" InputValue="DeviceImg1" Checked="true" />
                                                        <ext:Radio ID="Radio2" runat="server" BoxLabel="设备图2" InputValue="DeviceImg2" />
                                                        <ext:Radio ID="Radio3" runat="server" BoxLabel="设备图3" InputValue="DeviceImg3" />
                                                        <ext:Radio ID="Radio4" runat="server" BoxLabel="设备图4" InputValue="DeviceImg4" />
                                                        <ext:Radio ID="Radio5" runat="server" BoxLabel="设备图5" InputValue="DeviceImg5" />
                                                        <ext:Radio ID="Radio6" runat="server" BoxLabel="设备图6" InputValue="DeviceImg6" />
                                                        <ext:Radio ID="Radio8" runat="server" BoxLabel="设备图7" InputValue="DeviceImg7" />
                                                    </Items>
                                                </ext:RadioGroup>
                                                <ext:MultiUpload ID="MultiUpload1" runat="server" OnFileUpload="MultiUpload1_FileUpload"
                                                    AutoStartUpload="true" FileDropAnywhere="true" FileSizeLimit="15 MB" FileTypes="*.*"
                                                    FileTypesDescription="All Files" FileUploadLimit="100" FileQueueLimit="0">
                                                    <Button>
                                                        <ext:Button ID="Button3" runat="server" Text="上传图片" Icon="FolderImage">
                                                        </ext:Button>
                                                    </Button>
                                                    <Listeners>
                                                        <UploadStart Handler="Ext.Msg.wait('导入中，请稍等...');" />
                                                        <UploadError Fn="uploadError" />
                                                        <FileSelectionError Fn="fileSelectionError" />
                                                        <UploadComplete Handler="Ext.Msg.hide();" />
                                                    </Listeners>
                                                </ext:MultiUpload>
                                                <ext:Button ID="Button9" runat="server" Text="删除图片" Icon="Delete" OnDirectClick="BtnDeleteImg" />
                                            </Items>
                                        </ext:Panel>
                                    </Items>
                                    <Buttons>
                                        <ext:Button ID="Button1" runat="server" Text="保存修改" Icon="Disk">
                                            <Listeners>
                                                <Click Handler="
                                            r = #{EditPanel}.getForm().getRecord(); 
                                            if (r) {
                                                //#{EditPanel}.getForm().updateRecord(#{MainPanel}.getSelectionModel().getLastSelected());
                                            };
                                            saveRecord(#{EditPanel});" />
                                            </Listeners>
                                            <DirectEvents>
                                                <Click />
                                            </DirectEvents>
                                        </ext:Button>
                                        <ext:Button ID="Button2" runat="server" Text="取消" Icon="Cancel">
                                            <Listeners>
                                                <Click Handler="#{EditPanel}.getForm().reset();#{Panel3}.setCollapsed(true);" />
                                            </Listeners>
                                        </ext:Button>
                                    </Buttons>
                                </ext:Panel>--%>
                            </Items>
                        </ext:Panel>
                    </Items>
                </ext:Panel>
                <ext:Hidden ID="ActState" runat="server" ClientIDMode="Static" Text="Edit" />
            </Items>
        </ext:Viewport>
        <ext:Window runat="server" ID="winMain" Icon="Add" Hidden="true" Constrain="true" MinHeight="310" MinWidth="545" Modal="true" CloseAction="Hide" BodyPaddingSummary="10" Layout="FitLayout">
            <Buttons>
                <ext:Button runat="server" ID="btnMainSave" Text="保存" Icon="Disk">
                    <DirectEvents>
                        <Click OnEvent="btnMainSave_Click" Success="btnMainSave_Success" Failure="btnMainSave_Failure">
                            <EventMask ShowMask="true" Target="Page" Msg="保存中..." />
                            <ExtraParams>
                                <ext:Parameter Name="model" Mode="Raw" Value="#{frmMain}.getForm().getFieldValues()" />
                            </ExtraParams>
                        </Click>
                    </DirectEvents>
                </ext:Button>
                <ext:Button runat="server" ID="btnMainCancel" Text="取消" Icon="Cancel">
                    <Listeners>
                        <Click Handler="#{winMain}.close();" />
                    </Listeners>
                </ext:Button>
            </Buttons>
            <Items>
                <ext:FormPanel runat="server" ID="frmMain" Layout="ColumnLayout" Region="North">
                    <FieldDefaults LabelAlign="Left" LabelWidth="60" MsgTarget="Side" />
                    <Plugins>
                        <ext:DataTip runat="server" />
                    </Plugins>
                    <LayoutConfig>
                        <ext:ColumnLayoutConfig DefaultValueMode="Ignore" />
                    </LayoutConfig>
                    <Items>
                        <ext:Hidden runat="server" Name="ShopID" Text="" />
                    </Items>
                </ext:FormPanel>
            </Items>
        </ext:Window> 
        <ext:Window runat="server" ID="imgMain" Icon="FolderUp" Hidden="true" Constrain="true" MinHeight="260" MinWidth="545" Modal="true" CloseAction="Hide" BodyPaddingSummary="10" Layout="FitLayout">
            <Buttons>
                <ext:Button runat="server" ID="btnImgSave" Text="保存" Icon="Disk">
                    <DirectEvents>
                        <Click OnEvent="btnImgSave_Click" Success="btnImgSave_Success" Failure="btnImgSave_Failure">
                            <EventMask ShowMask="true" Target="Page" Msg="保存中..." />
                            <ExtraParams>
                                <ext:Parameter Name="model" Mode="Raw" Value="#{frmImg}.getForm().getFieldValues()" />
                            </ExtraParams>
                        </Click>
                    </DirectEvents>
                </ext:Button>
                <ext:Button runat="server" ID="btnImgCancel" Text="取消" Icon="Cancel">
                    <Listeners>
                        <Click Handler="#{imgMain}.close();" />
                    </Listeners>
                </ext:Button>
            </Buttons>
            <Items>
                <ext:FormPanel runat="server" AutoScroll="true" ID="frmImg" Layout="VBoxLayout">
                    <FieldDefaults LabelAlign="Left" LabelWidth="60" MsgTarget="Side" />
                    <Plugins>
                        <ext:DataTip runat="server" />
                    </Plugins>
                    <LayoutConfig>
                        <ext:VBoxLayoutConfig Align="Stretch" />
                    </LayoutConfig>
                    <Items>
                        <ext:FieldContainer runat="server" Layout="HBoxLayout">
                            <Items>
                                <ext:SelectBox runat="server" Name="ImgType" FieldLabel="图片类型" Editable="false" Flex="1" MarginSpec="0 10 0 0">
                                    <Items>
                                        <ext:ListItem Text="平面图" Value="1" />
                                        <ext:ListItem Text="布点图" Value="2" />
                                        <ext:ListItem Text="现场图" Value="3" />
                                        <ext:ListItem Text="通道图" Value="4" />
                                    </Items>
                                    <SelectedItems>
                                        <ext:ListItem Text="平面图" Value="1" />
                                    </SelectedItems>
                                </ext:SelectBox>
                            </Items>
                        </ext:FieldContainer>
                        <ext:FieldContainer runat="server" Layout="HBoxLayout">
                            <Items>
                                <ext:TextArea  runat="server" Name="Remarks" FieldLabel="图片描述" MaxLength="200" Flex="1" MarginSpec="0 10 0 0" />
                            </Items>
                        </ext:FieldContainer>
                        <ext:FieldContainer runat="server" Layout="HBoxLayout">
                            <Items>
                                <ext:FileUploadField runat="server" ID="UploadFile" Name="UploadFile" FieldLabel="选择图片" ButtonText="浏览..." />
                                <ext:Checkbox runat="server" Name="IsFirstImg" BoxLabel="是否首图" MarginSpec="0 10 0 20" />
                            </Items>
                        </ext:FieldContainer>
                        <ext:Hidden runat="server" Name="ShopCode" Text="" />
                    </Items>
                </ext:FormPanel>
            </Items>
        </ext:Window>
        <ext:Window runat="server" ID="imgPreview" Icon="Book" Hidden="true" Constrain="true" Height="700" Width="636" Modal="true" CloseAction="Hide" BodyPaddingSummary="10" Layout="FitLayout">
            <Buttons>
                <ext:Button runat="server" ID="btnPreviewCancel" Text="关闭" Icon="Cancel">
                    <Listeners>
                        <Click Handler="#{imgPreview}.close();" />
                    </Listeners>
                </ext:Button>
            </Buttons>
            <Items>
                <ext:FormPanel runat="server" AutoScroll="true" Height="660" Width="636" ID="frmPreview">
                    <Items>
                        <ext:Hidden runat="server" Name="ShopCode" Text="" />
                        <ext:Panel runat="server" >
                            <Items>
                                <ext:Panel runat="server" Layout="HBoxLayout">
                                    <Items>
                                        <ext:Panel runat="server" ID="imgPanelType1">
                                            <Items>
                                                <ext:Label runat="server" Text="平面图" />
                                                <ext:Image ID="imgType1Url1" runat="server" Width="300" Height="300" Cls="addDeleteImg" ClientIDMode="Static" MarginSpec="6 10 10 0" />
                                            </Items>
                                        </ext:Panel>
                                        <ext:Panel runat="server" ID="imgPanelType2">
                                            <Items>
                                                <ext:Label runat="server" Text="布点图" />
                                                <ext:Image ID="imgType2Url1" runat="server" Width="300" Height="300" Cls="addDeleteImg" ClientIDMode="Static" MarginSpec="6 10 10 0" />
                                            </Items>
                                        </ext:Panel>
                                    </Items>
                                </ext:Panel>
                                <ext:Panel runat="server" Layout="HBoxLayout">
                                    <Items>
                                        <ext:Panel runat="server" ID="imgPanelType3">
                                            <Items>
                                                <ext:Label ID="Label2" runat="server" Text="现场图" />
                                                <ext:Panel runat="server" Layout="ColumnLayout" Width="310">
                                                    <Items>
                                                        <ext:Image ID="imgType3Url1" runat="server" Width="93" Height="76" Cls="addDeleteImg" ClientIDMode="Static" MarginSpec="6 10 0 0" />
                                                        <ext:Image ID="imgType3Url2" runat="server" Width="93" Height="76" Cls="addDeleteImg" ClientIDMode="Static" MarginSpec="6 10 0 0" />
                                                        <ext:Image ID="imgType3Url3" runat="server" Width="93" Height="76" Cls="addDeleteImg" ClientIDMode="Static" MarginSpec="6 10 0 0" />
                                                        <ext:Image ID="imgType3Url4" runat="server" Width="93" Height="76" Cls="addDeleteImg" ClientIDMode="Static" MarginSpec="6 10 0 0" />
                                                        <ext:Image ID="imgType3Url5" runat="server" Width="93" Height="76" Cls="addDeleteImg" ClientIDMode="Static" MarginSpec="6 10 0 0" />
                                                        <ext:Image ID="imgType3Url6" runat="server" Width="93" Height="76" Cls="addDeleteImg" ClientIDMode="Static" MarginSpec="6 10 0 0" />
                                                        <ext:Image ID="imgType3Url7" runat="server" Width="93" Height="76" Cls="addDeleteImg" ClientIDMode="Static" MarginSpec="6 10 0 0" />
                                                    </Items>
                                                </ext:Panel>
                                            </Items>
                                        </ext:Panel>
                                        <ext:Panel runat="server" ID="imgPanelType4">
                                            <Items>
                                                <ext:Label runat="server" Text="通道图" />
                                                <ext:Panel runat="server" Layout="ColumnLayout" Width="310">
                                                    <Items>
                                                        <ext:Image ID="imgType4Url1" runat="server" Width="93" Height="76" Cls="addDeleteImg" ClientIDMode="Static" MarginSpec="6 10 0 0" />
                                                        <ext:Image ID="imgType4Url2" runat="server" Width="93" Height="76" Cls="addDeleteImg" ClientIDMode="Static" MarginSpec="6 10 0 0" />
                                                        <ext:Image ID="imgType4Url3" runat="server" Width="93" Height="76" Cls="addDeleteImg" ClientIDMode="Static" MarginSpec="6 10 0 0" />
                                                        <ext:Image ID="imgType4Url4" runat="server" Width="93" Height="76" Cls="addDeleteImg" ClientIDMode="Static" MarginSpec="6 10 0 0" />
                                                        <ext:Image ID="imgType4Url5" runat="server" Width="93" Height="76" Cls="addDeleteImg" ClientIDMode="Static" MarginSpec="6 10 0 0" />
                                                        <ext:Image ID="imgType4Url6" runat="server" Width="93" Height="76" Cls="addDeleteImg" ClientIDMode="Static" MarginSpec="6 10 0 0" />
                                                        <ext:Image ID="imgType4Url7" runat="server" Width="93" Height="76" Cls="addDeleteImg" ClientIDMode="Static" MarginSpec="6 10 0 0" />
                                                        <ext:Image ID="imgType4Url8" runat="server" Width="93" Height="76" Cls="addDeleteImg" ClientIDMode="Static" MarginSpec="6 10 0 0" />
                                                    </Items>
                                                </ext:Panel>
                                            </Items>
                                        </ext:Panel>
                                    </Items>
                                </ext:Panel>
                            </Items>
                        </ext:Panel>
                    </Items>
                </ext:FormPanel>
            </Items>
        </ext:Window>
        <ext:Hidden ID="hidIsRow" runat="server" ClientIDMode="Static" Text="" />

        <ext:Hidden ID="hidImgType1Title1" runat="server" ClientIDMode="Static" Text="" />
        <ext:Hidden ID="hidImgType2Title1" runat="server" ClientIDMode="Static" Text="" />

        <ext:Hidden ID="hidImgType3Title1" runat="server" ClientIDMode="Static" Text="" />
        <ext:Hidden ID="hidImgType3Title2" runat="server" ClientIDMode="Static" Text="" />
        <ext:Hidden ID="hidImgType3Title3" runat="server" ClientIDMode="Static" Text="" />
        <ext:Hidden ID="hidImgType3Title4" runat="server" ClientIDMode="Static" Text="" />
        <ext:Hidden ID="hidImgType3Title5" runat="server" ClientIDMode="Static" Text="" />
        <ext:Hidden ID="hidImgType3Title6" runat="server" ClientIDMode="Static" Text="" />
        <ext:Hidden ID="hidImgType3Title7" runat="server" ClientIDMode="Static" Text="" />

        <ext:Hidden ID="hidImgType4Title1" runat="server" ClientIDMode="Static" Text="" />
        <ext:Hidden ID="hidImgType4Title2" runat="server" ClientIDMode="Static" Text="" />
        <ext:Hidden ID="hidImgType4Title3" runat="server" ClientIDMode="Static" Text="" />
        <ext:Hidden ID="hidImgType4Title4" runat="server" ClientIDMode="Static" Text="" />
        <ext:Hidden ID="hidImgType4Title5" runat="server" ClientIDMode="Static" Text="" />
        <ext:Hidden ID="hidImgType4Title6" runat="server" ClientIDMode="Static" Text="" />
        <ext:Hidden ID="hidImgType4Title7" runat="server" ClientIDMode="Static" Text="" />
        <ext:Hidden ID="hidImgType4Title8" runat="server" ClientIDMode="Static" Text="" />

    </div>
    </form>
</body>
</html>
